import React,{Component} from "react"
import ReactLoading from "react-loading";
import propTypes from "prop-types";

export default class Loading extends Component{
  static propTypes = {
    width:propTypes.number,
    height:propTypes.number,
    color:propTypes.string,
    type:propTypes.string
  };

  static defaultProps = {
    width:32,
    height:32,
    color:'#0097C9',
    type:"spin"
  };

  render(){
    let {width,height,color,type} = this.props;
    return (
      <div className="c-loading">
        <ReactLoading width={width} height={height} color={color} type={type}   />
      </div>
    )
  }
}